<?php


namespace App\Services\Business\Models;

use App\Services\Business\Models\Base;
use App\Services\Business\Models\VideoRecord;
use App\Services\Member\Models\User;
use App\Services\Business\Models\Photo;
use App\Services\Business\Models\District;
use Illuminate\Database\Eloquent\Relations\MorphToMany;


class UserDistrict extends Base
{


    protected $table = 'user_district';

    protected $fillable = [
        'user_id', 'district_id'
    ];


    public function photos()
    {
        return $this->morphMany(Photo::class, 'photoable');

    }

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function district()
    {
        return $this->belongsTo(Location::class, 'district_id');
    }




}
